<template>
	<view>
		<uni-group title="医生列表">
			<uni-card>
				<view v-for="(item,index) in list" @click="dianji(index)">
					<view class=" user-box u-p-l-30 u-p-r-20 u-p-b-30 u-border-bottom u-padding-top-10" style="display: flex;">
						<view class="u-m-r-10">
							<u-avatar :src="base+item.avatar" size="100"></u-avatar>
						</view>
						<view class="u-flex-1">
							<view class="u-font-18 u-p-b-20">{{item.name}}</view>
							<view class="u-font-18 u-p-b-20">职称:{{item.jobName}}</view>
							<view class="u-font-18 u-p-b-20">执业编号:{{item.practiceNo}}</view>
							<view class="u-font-18 u-p-b-20">从业年限时间:{{item.workingYears}}</view>
							<view class="u-font-14 u-tips-color">擅长描述:{{item.goodAt}}</view>
				
						</view>
					</view>
				</view>
			</uni-card>
		</uni-group>
	</view>
</template>

<script>
	import api from 'commer/apiURL.js'
	export default {
		data() {
			return {
				base:api.baseurl,
				list:[]
			}
		},
		onLoad(options) {
			this.getlun(options.id)
		},
		methods: {
			getlun(id){
				this.$get(this.base+'/prod-api/api/pet-hospital/pet-doctor/list',{
					typeId:id
				}).then((res)=>{
					this.list = res.rows		
					
				})
			},
			dianji(index){
				uni.setStorage({
					key:'wen',
					data:this.list[index],
					success: (res) => {
						uni.navigateTo({
							url:'wenz'
						})
					}
				})
			}
		}
	}
</script>

<style>

</style>
